<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>ajax</title>
		<script type="text/javascript">
			
			function send(){
				//创建参数
				var req=new XMLHttpRequest();
				//设置参数
				req.open("get","http://10.9.163.6/1642/test.php",true)
				//事件函数
				req.onreadystatechange=function(){
					if(req.readyState==4){
						console.log(req.responseText);
					}
				}
				//发送
				req.send();
			}
		</script>
	</head>
	<body>
		<button onclick="send()">点击</button>
		<marquee>滚来滚去</marquee>
	</body>

</html>